home *** CD-ROM | disk | FTP | other *** search
- global gNbWord, gTextLanguage, gInterfaceLanguage, gCurrentPos, gListWordFrench, gNbItem, gListWordEnglish, gNbWordMax, gDataPath, gListWordSpanish, gTermObj, gIdxTermObj, gIndexPicObj
-
- on InitializeFiles
- if getAt(gNbWord, gTextLanguage) = 0 then
- set gNbWord to [0, 0, 0]
- set gNbItem to [0, 0, 0]
- set gNbWordMax to [0, 0, 0]
- set gListWordFrench to []
- set gListWordEnglish to []
- set gListWordSpanish to []
- addRAMobjects(#CastList, [10529, 10556])
- set the text of cast 10556 to getString(#wait, gInterfaceLanguage)
- set the castNum of sprite 35 to 10529
- set the locH of sprite 35 to 320
- set the locV of sprite 35 to 220
- set the castNum of sprite 36 to 10556
- set the ink of sprite 36 to 36
- set the locH of sprite 36 to 181
- set the locV of sprite 36 to 205
- puppetTransition(9, 0, 5)
- updateStage()
- puppetTransition(0)
- set gCurrentPos to [1, 1, 1]
- if gTextLanguage = 1 then
- set gListWordFrench to []
- set fileObj1 to FileIO(mnew, "read", gDataPath & "words1.001")
- set theLine1 to fileObj1(mReadFile)
- add(gListWordFrench, value(theLine1))
- if objectp(fileObj1) then
- fileObj1(mdispose)
- end if
- set fileObj2 to FileIO(mnew, "read", gDataPath & "words2.001")
- set theLine1 to fileObj2(mReadFile)
- add(gListWordFrench, value(theLine1))
- if objectp(fileObj2) then
- fileObj2(mdispose)
- end if
- set fileObj3 to FileIO(mnew, "read", gDataPath & "words3.001")
- set theLine1 to fileObj3(mReadFile)
- add(gListWordFrench, value(theLine1))
- if objectp(fileObj3) then
- fileObj3(mdispose)
- end if
- set fileObj4 to FileIO(mnew, "read", gDataPath & "words4.001")
- set theLine1 to fileObj4(mReadFile)
- add(gListWordFrench, value(theLine1))
- if objectp(fileObj4) then
- fileObj4(mdispose)
- end if
- set fileObj5 to FileIO(mnew, "read", gDataPath & "words5.001")
- set theLine1 to fileObj5(mReadFile)
- add(gListWordFrench, value(theLine1))
- if objectp(fileObj5) then
- fileObj5(mdispose)
- end if
- setAt(gNbWordMax, gTextLanguage, count(getAt(gListWordFrench, 1)))
- setAt(gNbWord, gTextLanguage, (getAt(gNbWordMax, gTextLanguage) * 4) + count(getAt(gListWordFrench, 5)))
- else
- if gTextLanguage = 2 then
- set gListWordEnglish to []
- set fileObj1 to FileIO(mnew, "read", gDataPath & "words1.002")
- set theLine1 to fileObj1(mReadFile)
- add(gListWordEnglish, value(theLine1))
- if objectp(fileObj1) then
- fileObj1(mdispose)
- end if
- set fileObj2 to FileIO(mnew, "read", gDataPath & "words2.002")
- set theLine1 to fileObj2(mReadFile)
- add(gListWordEnglish, value(theLine1))
- if objectp(fileObj2) then
- fileObj2(mdispose)
- end if
- set fileObj3 to FileIO(mnew, "read", gDataPath & "words3.002")
- set theLine1 to fileObj3(mReadFile)
- add(gListWordEnglish, value(theLine1))
- if objectp(fileObj3) then
- fileObj3(mdispose)
- end if
- set fileObj4 to FileIO(mnew, "read", gDataPath & "words4.002")
- set theLine1 to fileObj4(mReadFile)
- add(gListWordEnglish, value(theLine1))
- if objectp(fileObj4) then
- fileObj4(mdispose)
- end if
- set fileObj5 to FileIO(mnew, "read", gDataPath & "words5.002")
- set theLine1 to fileObj5(mReadFile)
- add(gListWordEnglish, value(theLine1))
- if objectp(fileObj5) then
- fileObj5(mdispose)
- end if
- setAt(gNbWordMax, gTextLanguage, count(getAt(gListWordEnglish, 1)))
- setAt(gNbWord, gTextLanguage, (getAt(gNbWordMax, gTextLanguage) * 4) + count(getAt(gListWordEnglish, 5)))
- else
- if gTextLanguage = 3 then
- set gListWordSpanish to []
- set fileObj1 to FileIO(mnew, "read", gDataPath & "words1.003")
- set theLine1 to fileObj1(mReadFile)
- add(gListWordSpanish, value(theLine1))
- if objectp(fileObj1) then
- fileObj1(mdispose)
- end if
- set fileObj2 to FileIO(mnew, "read", gDataPath & "words2.003")
- set theLine1 to fileObj2(mReadFile)
- add(gListWordSpanish, value(theLine1))
- if objectp(fileObj2) then
- fileObj2(mdispose)
- end if
- set fileObj3 to FileIO(mnew, "read", gDataPath & "words3.003")
- set theLine1 to fileObj3(mReadFile)
- add(gListWordSpanish, value(theLine1))
- if objectp(fileObj3) then
- fileObj3(mdispose)
- end if
- set fileObj4 to FileIO(mnew, "read", gDataPath & "words4.003")
- set theLine1 to fileObj4(mReadFile)
- add(gListWordSpanish, value(theLine1))
- if objectp(fileObj4) then
- fileObj4(mdispose)
- end if
- set fileObj5 to FileIO(mnew, "read", gDataPath & "words5.003")
- set theLine1 to fileObj5(mReadFile)
- add(gListWordSpanish, value(theLine1))
- if objectp(fileObj5) then
- fileObj5(mdispose)
- end if
- setAt(gNbWordMax, gTextLanguage, count(getAt(gListWordSpanish, 1)))
- setAt(gNbWord, gTextLanguage, (getAt(gNbWordMax, gTextLanguage) * 4) + count(getAt(gListWordSpanish, 5)))
- end if
- end if
- end if
- set gNbItem to [getAt(gNbWord, gTextLanguage), 0, 0]
- set the visible of sprite 48 to 0
- set the visible of sprite 47 to 0
- updateStage()
- end if
- set CurrentPath to gDataPath
- if objectp(gTermObj) then
- gTermObj(mdispose)
- end if
- if objectp(gIdxTermObj) then
- gIdxTermObj(mdispose)
- end if
- if gTextLanguage = 1 then
- set gTermObj to FileIO(mnew, "read", CurrentPath & "terms.001")
- set gIdxTermObj to FileIO(mnew, "read", CurrentPath & "idxterms.001")
- else
- if gTextLanguage = 2 then
- set gTermObj to FileIO(mnew, "read", CurrentPath & "terms.002")
- set gIdxTermObj to FileIO(mnew, "read", CurrentPath & "idxterms.002")
- else
- if gTextLanguage = 3 then
- set gTermObj to FileIO(mnew, "read", CurrentPath & "terms.003")
- set gIdxTermObj to FileIO(mnew, "read", CurrentPath & "idxterms.003")
- end if
- end if
- end if
- set gIndexPicObj to FileIO(mnew, "read", CurrentPath & "Pages_i.all")
- end
-